import Vue from 'vue';
import '@vant/touch-emulator';
// 导入 Store
import Vuex from 'vuex';
Vue.use(Vuex);
import createStore from './store/index.js';
const Store = createStore();

// 导入路由相关操作
import VueRouter from 'vue-router';
Vue.use(VueRouter);
import createRouter from './router/main.js';
const Router = createRouter();

// 定义的 util 工具
import createUtil from './libs/js/util.js';
Vue.prototype.$util = createUtil();

// 引用 moment 时间操作库
import Moment from 'moment';
Vue.prototype.$moment = Moment;

// element-ui
import { Loading } from 'element-ui';
Vue.use(Loading.directive);

// vant
import Vant from 'vant';
import 'vant/lib/index.css';
Vue.use(Vant);
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
Vue.use(ElementUI);

// 导入 App.vue
import App from './app.vue';

new Vue({
    el: '#app',
    store: Store,
    router: Router,
    render: h => h(App)
});
